<template>
  <div id="cart-list">
    <CartListItem
      v-for="(item, index) in cartList"
      :key="index"
      :product="item"
    ></CartListItem>
  </div>
</template>

<script>
import CartListItem from "./CartListItem.vue";
export default {
  components: {
    CartListItem,
  },
  computed: {
    cartList() {
      return this.$store.state.cartList;
    },
  },
};
</script>

<style lang="less" scoped>
#cart-list {
  width: 100vw;
  overflow: hidden;
  background-color: #f1f3f4;
  li {
    list-style: none;
  }
}
</style>